|
|
|
|
|
|
|
Using the RemoteData Control |
|
|
|
|
|
|
|
|
If you want a faster way to create applications using ODBC data sources, you can use the RemoteData control (RDC). The RDC lets you set a few properties of the control, and then the RDC handles all the tasks of making the connections to the ODBC data source for you. In this way, the RDC automates the methods of the remote data objects in the same way that the data control automates the methods of the data access objects. |
|
|
|
|
|
|
|
|
After setting up the RemoteData control, you can use the bound controls to display and edit information that is in the resultset created by the data control. The bound controls are set up the same way they are for use with the Data controlwhich was discussed in Chapter 25, "The Data Control and Data-Bound Controls"except that the DataSource property of the bound controls points to a RemoteData control. After they are set up, the bound controls are updated with new information each time a new row is accessed by the remote data control. |
|
|
|
|
|
|
|
|
Comparing the RDC and the Data Control |
|
|
|
|
|
|
|
|
The remote data objects were compared to the data access objects in the earlier section "The Remote Data Objects"; now take a look at the similarities of the Data control and the RDC. As you might expect, many of the properties of the RDC have counterparts in the Data control. These properties and their functions are summarized in Table 27.5. |
|
|
|
|
| Table 27.5 Remote Data Control Properties Compared to Data Control Properties | | RDC Property | Data Control Property | Purpose | | BOFAction | BOFAction | Determines whether the beginning of file flag is set when the user invokes the MovePrevious method while on the first record. | | DataSourceName | DatabaseName | Specifies the database containing the desired information. | | EOFAction | EOFAction | Determines whether the end of file flag is set or if a new row (record) is added when the user invokes the MoveNext method while on the last record. | | ResultsetType | RecordsetType | Determines the type of dataset created by the control. | | SQL | RecordSource | The SQL statement that identifies the specific information to be retrieved. |
|
|
|